SOCKETS.PEEK Function
The SOCKETS object is deprecated and may be removed in a future release. Use INET::Socket instead.
Syntax
Data as C = Peek(N Length)
Arguments
- Data
Binary data returned from the socket.
- Length
The number of bytes of data to read.
Description
Read bytes from socket into string without removing the bytes from the socket stream.
Discussion
The .PEEK() method reads the specified number of bytes from the socket, but does not remove the data that has been read from the socket buffer. This allows you to see if there is data in the socket buffer before you actually read (and therefore) remove it.
See Also